'use strict';

const dir = {
    src: 'src',
    // dest: '../build',
    dest: 'build',
    rev: '.temp'
}

module.exports = {
    js: {
        all: `${dir.src}/js/*.js`,
        src: [
            `${dir.src}/js/extend.js`,
            `${dir.src}/js/init.js`,
            `${dir.src}/js/utils.js`,
            `${dir.src}/js/prototype.js`,
            // `${dir.src}/js/cookie.js`,
            // `${dir.src}/js/template.js`,
            // `${dir.src}/js/date.js`,
            // `${dir.src}/js/user.js`,
            `${dir.src}/js/jump.js`,
            `${dir.src}/js/countdown.js`,
            `${dir.src}/js/touch.js`,
            `${dir.src}/js/form.js`,
            `${dir.src}/js/navbar.js`,
            // `${dir.src}/js/nodata.js`,
            `${dir.src}/js/popup.js`,
            `${dir.src}/js/tab.js`,
            `${dir.src}/js/toast.js`,
            `${dir.src}/js/dialog.js`,
            `${dir.src}/js/loading.js`
            // `${dir.src}/js/infinite.js`,
            // `${dir.src}/js/jweixin.js`
        ],                                          //- 所有js文件(需要合并的js)
        dest: `${dir.dest}/core`,                   //- 输出目录
        name: 'core.js',                            //- 合并后的js文件名
        rev: `${dir.rev}/js`
    },
    less: {
        core: {
            all: `${dir.src}/less/**/*.less`,       //- 所有less文件
            src: `${dir.src}/less/*.less`,          //- 需要编译的less
            dest: `${dir.dest}/core`,               //- 输出目录
            rev: `${dir.rev}/css`
        },
        dev: {
            src: `${dir.src}/view/**/*.less`,
            dest: `${dir.dest}/css`
        }
    },
    view: {
        src: `${dir.src}/view/**/*.html`,           //- 需要编译的html
        dest: `${dir.dest}/view`,                   //- 输出目录
        build: `${dir.dest}/view/**/*.html`
    },
    ejs: {
        src: `${dir.src}/ejs/*.ejs`                 //- ejs模板文件
    },
    lib: {
        src: `${dir.src}/lib/**/*`,                 //- 所有lib文件
        dest: `${dir.dest}/lib`                     //- 输出目录
    },
    img: {
        src: `${dir.src}/img/**/*`,                 //- 所有img文件
        dest: `${dir.dest}/img`                     //- 输出目录
    },
    rev: {
        json: `${dir.rev}/**/*.json`                //- rev版本映射文件
    },
    clean: {
        src: [`${dir.dest}/`, `${dir.rev}/`]        //- 需要清理的目录
    },
    server: {
        port: '80',                                 //- 服务器访问端口
        root: `${dir.dest}`,                        //- 服务器访问根目录
        index: `view/home/index.html`               //- 指定默认打开的页面
    },
    browsers: [                                     //- 设置兼容浏览器(CSS私有前缀)
        'last 2 version',
        'safari 5',
        'ie 8',
        'ie 9',
        'opera 12',
        'firefox 20',
        'ios 6',
        'android 4'
    ],
    zip: {                                          //- zip压缩目录、文件
        src: [
            '{src,gulp,tasks,ide,plugins}/**/*',
            '*.{js,json,md}',
            '.babelrc',
            '.gitignore',
            'LICENSE'
        ],
        dest: './backup/'
    },
    ftp: {
        src: [                                      //- FTP发布目录
            `${dir.dest}/**`,
            `!${dir.dest}/css/**`
        ],
        dest: '/vdenzWx'
    }
}